package cn.cxq.learning.dynamic_programming;

import org.junit.jupiter.api.Test;

public class Client {

    @Test
    public void testKnapsackProblem() {
        int[] weight = {1, 4, 3, 6, 100, 8, 4, 20, 9, 15, 12, 40, 6};
        int[] value = {1500, 3000, 2000, 5000, 200000, 7000, 6000, 30000, 10000, 40000, 12000, 80000, 70000};
        KnapsackProblem knapsackProblem = new KnapsackProblem(weight, value, 100);

        System.out.println("解决前：");
        knapsackProblem.printV();

        knapsackProblem.solve();

        System.out.println("解决后：");
        knapsackProblem.printV();
        knapsackProblem.printPath();
    }
}
